package org.hq.controller;

import com.alibaba.fastjson2.JSON;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.hq.pojo.select.VideoSelect;
import org.hq.service.sql.MysqlManageService;
import org.hq.sesponse.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 视频详询信息  前端控制器
 * </p>
 *
 * @author 来一炮
 * @since 2024-09-14
 */
@RestController
@RequestMapping("/videoMessage")
public class VideoMessageController {
    @Autowired
    private MysqlManageService sqls;

    @GetMapping("/index")
	public R<Object> index() {
        Page<VideoSelect> page = sqls.pageAllVideoSelect(50, 30);

      //  String json = JSON.toJSONString(R.ok(page));
      //  R r = JSON.parseObject(json, R.class);
      //  Object data = r.getData();
       // JSON.parseObject((String) data, Page.class);
       // System.out.println(data);
        return R.ok(page);
	}

}
